package com.jingwee.springbootevtlistener.listener;

import com.jingwee.springbootevtlistener.event.MyEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

@Order(2)
@Slf4j
@Configuration
public class CustomerListener implements ApplicationListener<MyEvent> {
    @Override
    public void onApplicationEvent(MyEvent event) {
        log.info("myEvent is called，myEvent={}", event.toString());
    }
}
